<template>
  <div class="com-container">
    <div ref="totalFlow" class="com-chart">1111</div>
  </div>
</template>
<script setup name="TotalFlowCom">
import { shallowRef, onMounted, onBeforeUnmount } from 'vue'
import { useTotalFlow } from '../hooks/useTotalFlow'
const { registerTotalFlow, initChart, screenAdapter, queryInitPipelineId } = useTotalFlow()
const totalFlow = shallowRef()
onMounted(() => {
  registerTotalFlow(totalFlow.value)
  queryInitPipelineId()
  initChart()
  window.addEventListener('resize', screenAdapter)
  screenAdapter()
})
onBeforeUnmount(() => {
  window.removeEventListener('resize', screenAdapter)
})
</script>
<style lang="less" scoped></style>
